/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package java1;

/**
 *
 * @author sally
 */
import java.io.*;
public class IO4 {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
	try( FileReader fr = new FileReader("data2.txt");
            BufferedReader br = new BufferedReader( fr ); ) {
           String line=" ";
	   while((line=br.readLine( ) )!=null )
	       System.out.println( line );
	
       }catch(Exception e){
            e.printStackTrace();
        }
    }
    
}
